package com.producter.controller;

import com.producter.dao.entity.Result;
import com.producter.service.GoodService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/good")
public class GoodController {
    @Autowired
    GoodService goodService;
    @GetMapping("/addNums")
    public Result addNums(){
        return goodService.addNums()>0?Result.success():Result.failure();
    }
    @GetMapping("/getNums")
    public Result getNums(){
        return Result.success(goodService.getNums());
    }
}
